import { getVideoDetailService } from '../../../model/service/video/getVideoDetailService';

export default async function getVideoDetail(ctx: Context, next: Next) {
  const { body } = ctx.request;
  const { id } = body;

  try {
    const result = await getVideoDetailService({ id });
    ctx.api.success(result, 'success');
  } catch (error) {
    ctx.api.fail(-1, '查询失败')
  }


  return next();
}